<template>
  <div class="page-login">
    <div class="page-login--layer page-login--layer-area">
      <ul class="circles">
        <li v-for="n in 10" :key="n"></li>
      </ul>
    </div>
    <div
      class="page-login--layer page-login--layer-time"
      flex="main:center cross:center"
    >
      {{ time }}
    </div>
    <div class="page-login--layer">
      <div
        class="page-login--content"
        flex="dir:top main:justify cross:stretch box:justify"
      >
        <div class="page-login--content-header">
          <p class="page-login--content-header-motto">
            时间是一切财富中最宝贵的财富.
          </p>
        </div>
        <div
          class="page-login--content-main"
          flex="dir:top main:center cross:center"
        >
          <!-- logo -->
          <img class="page-login--logo" src="./image/logo.png" />
          <!-- form -->
          <div class="page-login--form">
            <el-card shadow="never">
              <el-form
                ref="loginForm"
                label-position="top"
                :rules="rules"
                :model="formLogin"
                size="default"
              >
                <el-form-item prop="username">
                  <el-input
                    type="text"
                    v-model="formLogin.username"
                    placeholder="用户名"
                  >
                    <i slot="prepend" class="fa fa-user-circle-o"></i>
                  </el-input>
                </el-form-item>
                <el-form-item prop="password">
                  <el-input
                    type="password"
                    v-model="formLogin.password"
                    placeholder="密码"
                    show-password="true"
                  >
                    <i slot="prepend" class="fa fa-keyboard-o"></i>
                  </el-input>
                </el-form-item>
                <el-form-item v-if="type" prop="code">
                  <el-input
                    type="text"
                    v-model="formLogin.code"
                    placeholder="验证码"
                  >
                    <template slot="append">
                      <img
                        class="login-code"
                        :src="this.captcha"
                        @click="getCode()"
                      />
                    </template>
                  </el-input>
                </el-form-item>

                <el-radio-group style="margin-bottom:10rpx" v-model="radio">
                  <el-radio :label="2">老师</el-radio>
                  <el-radio :label="3">学生</el-radio>
                  <el-radio :label="1">管理员</el-radio>
                </el-radio-group>

                <el-button
                  :loading="button_loading"
                  size="default"
                  @click="submit"
                  type="primary"
                  class="button-login"
                  native-type="submit"
                >
                  登录
                </el-button>
              </el-form>
            </el-card>
            <p class="page-login--options" flex="main:justify cross:center">
              <span><d2-icon name="question-circle" /> 忘记密码</span>
              <span>注册用户</span>
            </p>
            <!-- quick login -->
            <!-- <el-button class="page-login--quick" size="default" type="info" @click="type=!type">
              {{this.type==true?'用武汉学院学号登录（测试功能）':'用账号密码登录'}}
            </el-button> -->
          </div>
        </div>
        <div class="page-login--content-footer">
          <!-- <p class="page-login--content-footer-locales">
            <a
              v-for="language in $languages"
              :key="language.value"
              @click="onChangeLocale(language.value)"
            >
              {{ language.label }}
            </a>
          </p> -->
          <p
            style="font-size:15px;  margin-bottom:15px"
            class="page-login--content-footer-copyright"
          >
            Copyright
            <d2-icon name="copyright" />
            2022 苏才华&风离&任威
            <a href="https://gitee.com/fl1906249647/web-vue">
              @Gitee
            </a>
          </p>

          <p style="font-size:18px" class="page-login--content-footer-options">
            <a href="https://beian.miit.gov.cn/#/">鄂ICP备2020021992号-2</a>
          </p>
        </div>
      </div>
    </div>
    <el-dialog title="快速选择用户" :visible.sync="dialogVisible" width="400px">
      <el-row :gutter="10" style="margin: -20px 0px -10px 0px;">
        <el-col v-for="(user, index) in users" :key="index" :span="8">
          <div class="page-login--quick-user" @click="handleUserBtnClick(user)">
            <d2-icon name="user-circle-o" />
            <span>{{ user.name }}</span>
          </div>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>

<script>
import util from "@/libs/util";
import dayjs from "dayjs";
import { mapActions } from "vuex";
import localeMixin from "@/locales/mixin.js";
import { get_Code } from "@/api/sys.user.js";
import { RSA } from "@/libs/util.password.js";
import axios from "axios";
export default {
  mixins: [localeMixin],
  data() {
    return {
      radio: 3,
      button_loading: false,
      type: true, //登录方式
      uuid: null,
      captcha: null,
      timeInterval: null,
      time: dayjs().format("HH:mm:ss"),
      // 快速选择用户
      dialogVisible: false,
      users: [
        {
          name: "Admin",
          username: "admin",
          password: "admin"
        },
        {
          name: "Editor",
          username: "editor",
          password: "editor"
        },
        {
          name: "User1",
          username: "user1",
          password: "user1"
        }
      ],
      // 表单
      formLogin: {
        username: "19202140437",
        password: "Rw20010523",
        code: ""
      },
      // 表单校验
      rules: {
        username: [
          {
            required: true,
            message: "请输入用户名",
            trigger: "blur"
          }
        ],
        password: [
          {
            required: true,
            message: "请输入密码",
            trigger: "blur"
          }
        ],
        code: [
          {
            required: true,
            message: "请输入验证码",
            trigger: "blur"
          }
        ]
      }
    };
  },
  //计算属性

  computed: {
    formLogin() {
      if (this.radio == 3) {
        return {
          username: "19202140437",
          password: "Rw20010523"
        };
      } else if (this.radio == 1) {
        return {
          username: "fl1906",
          password: "rewq4321"
        };
      } else {
        return {
          username: "tea",
          password: "rewq4321"
        };
      }
    }
  },
  watch: {
    radio(val) {
      if (val == 3) {
        this.formLogin.username = "19202140437";
        this.formLogin.password = "Rw20010523";
      } else if (val == 1) {
        (this.formLogin.username = "fl1906"),
          (this.formLogin.password = "rewq4321");
      } else {
        (this.formLogin.username = "tea"),
          (this.formLogin.password = "rewq4321");
      }
    }
  },

  //回车登录

  mounted() {
    this.timeInterval = setInterval(() => {
      this.refreshTime();
    }, 1000);
  },
  beforeDestroy() {
    clearInterval(this.timeInterval);
  },
  methods: {
    //切换登录方式
    onChangeLocale(language) {
      console.log(language);
    },
    getCode() {
      console.log("发送");
      // this.captcha='\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAoAGQDASIA\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\nAw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xyeTjjrzjt2ptc\n2iGZu/ULoIgIt42+VBnYDxnA7ngH8qZc6dHBaSSLMJJI2AcD+HIHH15B/GtVrEeQIYn8uMYG1VGM\nDHy46YOMdOlVr2QSQ3Fskm6SJA0gznHOR29B0z6HuMjhpcNFuVbSweS28x53WGRh8kYLZ6L07Dge\n3Unuavxi1tbOR3i8lYo/MkEhBIGMknBPoR+BxUOnSk2KIU3KrcZTIznI/WrMF8rq25gzK7Kdoxjn\ngYJz0x9evQ0RWgzIvYtl8WkimSAsCeS2eADjJwOnQfXqTWnFNYzMu24ZcDGwtj09fTHarQuYicbs\nfUVl3RspHNvaWRnmUdIfkVfq3TscdeRijle4mh93DOkST2rO0eNxBGG/EYH5dajXU1W1MnnBHUqG\nWQnG3IBIwDk4ycY9uBzU9pY3g2mWZYIwMeTFycdeW9fXAx+dJc6NGEDWmY3XkDcSD+PajVO4XZnX\nN0JrlLqISFQQRIVYK2P7ufp+daIj1OT/AFKWVvA5J2gFiCTkt0wTnJ/HmqNzdyyW32a5UiWNgQ2O\nT9fzra0+TzLCFvRdv5cf0pRerE9SslhfouP7RVvrbj+horSoqx3Ihbxrny18vJLHZxyTkn8Sajkj\nuUCPE6zODt2yMUG0kZPAIJAGRx6jIzRRUp3b8gG3ErbNksDMjkRlBGZA2445A7c88YAyTxTvtAbh\ngD7Zx+hoop7DsmMk1K3jgEwO5C4XKsuOuDznHHJPfg9TxVMX0txiGC1We4A/eTeWyRDtnJ5z0O0Z\n4PU9aKKb3sUo6Nk8WmGRD9umMxJyET5VQ+3f15zWgqKihUUKo6ADAFFFBAtFFFAFe7sortMOMMOj\njqKkggS2hWKMYUevU0UUrASUUUUwP//Z'
      get_Code()
        .then(res => {
          console.log(res);
          if (res.statusCode == 200) {
            this.uuid = res.data.uuid;
            this.captcha = "data: image/ png ; base64 ," + res.data.captcha;
            // this.captcha='\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIR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+8WJBwMAcZPtWFf+E9Isx5s0dzFBkkv9oQHJbIUAjnAz74UfeOT\nUuLjqVdT0/UpavcJfeNbAaexkmRkDuhDZIbJ5HBwP/r127WplkkJfdggEOpAzwc+h6jnkceua57T\ndJghQvoMcgMi7TeTMAV4/hypzyPTGeue2y+hJdbf7Rup7wKMBGbYv+9hcfN1596cVfdEzdmtTlPF\nmpQtpUNnBMs0xKm4aPDKuADjeAAeSOcdu3SqumaJqHikx3E7mCwhAjhByQFHGEB9PX/I9FFrbi2N\nsIIhAQQYtg24PXjpUiIsaKiKFRQAqqMAD0FX7PW7J9pZWRjQeH5UgSOTVrsCMbUW2IhUL/ujPPXm\nituir5URzMYAzFw6JtDDbg5yMDk8cHOfXoD7BjQRzlXngiZ0LbCRuKg8ZBI4JHX+tFFOy7CuQTWg\nSN5IhIWAJEcZA3ewyQM/Ugc0yFLtEWScMszIokWKXzEUjrjIGe/OASMfgUVHIktC1NiqiG6E/mJ5\n4TywZFwQuckD0yQM464HoMVtR1WxtTCbwws6SBkCPl0OSu4DqMfMCfTcO+CUVHM7XHtNREWa/uN0\nWm20dvbMxYXUzbs7jklV9csSM8cVLZaHbWzJNO8l5dKABNcMXIxzwD055HfnrRRVxWibJemiNSii\nirJCiiigAooooA//2Q=='
          }
        })
        .catch(err => {
          console.log(err);
        });
    },
    ...mapActions("d2admin/account", ["login", "login2"]),
    ...mapActions("d2admin/user", ["set"]),
    refreshTime() {
      this.time = dayjs().format("HH:mm:ss");
    },
    /**
     * @description 接收选择一个用户快速登录的事件
     * @param {Object} user 用户信息
     */
    handleUserBtnClick(user) {
      this.formLogin.username = user.username;
      this.formLogin.password = user.password;
      this.submit();
    },
    /**
     * @description 提交表单
     */
    // 提交登录信息
    submit() {
      this.$refs.loginForm.validate(valid => {
        this.button_loading = true;
        if (valid) {
          // 登录
          // 注意 这里的演示没有传验证码
          // 具体需要传递的数据请自行修改代码
          //判断登录方式
          if (this.type) {
            let pass = RSA(this.formLogin.password);
            var password =
              this.formLogin.username.length == 11
                ? pass.clear
                : this.formLogin.password;
            let fl1906 =
              this.formLogin.username.length == 11
                ? pass.ecodeMsg
                : this.formLogin.password;
            this.login({
              username: this.formLogin.username,
              password: password,
              fl1906: fl1906,
              captcha: this.formLogin.code,
              uuid: this.uuid,
              loginType: this.radio
            })
              .then(res => {
                console.log("登录");
                // 重定向对象不存在则返回顶层路径
                this.set({
                  token: util.cookies.get("token")
                });
                console.log(res);
                this.button_loading = false;
                this.$router.replace(this.$route.query.redirect || "/");
              })
              .catch(err => {
                console.log(err);
                this.getCode();
                this.button_loading = false;
              });
          } else {
            var password = RSA(this.formLogin.password).clear;
            this.login2({
              username: this.formLogin.username,
              password: password
              // uuid:this.uuid
            })

              .then(res => {
                this.button_loading = false;
                // this.$router.replace(this.$route.query.redirect || '/')
              })
              .catch(err => {
                this.button_loading = false;
              });
          }
        } else {
          // 登录表单校验失败
          this.$message.error("表单校验失败，请检查");
          this.button_loading = false;
          
        }
      });
    }
  },
  //创建实例时调用
  created() {
    console.log("create");
    this.getCode();
  }
};
</script>

<style lang="scss">
.el-radio-group {
  font-size: 0;
  margin-bottom: 10px;
}
.page-login {
  @extend %unable-select;
  $backgroundColor: #f0f2f5;
  // ---
  background-color: $backgroundColor;
  height: 100%;
  position: relative;
  // 层
  .page-login--layer {
    @extend %full;
    overflow: auto;
  }
  .page-login--layer-area {
    overflow: hidden;
  }
  // 时间
  .page-login--layer-time {
    font-size: 24em;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.03);
    overflow: hidden;
  }
  // 登陆页面控件的容器
  .page-login--content {
    height: 100%;
    min-height: 500px;
  }
  // header
  .page-login--content-header {
    padding: 1em 0;
    .page-login--content-header-motto {
      margin: 0px;
      padding: 0px;
      color: $color-text-normal;
      text-align: center;
      font-size: 12px;
    }
  }
  // main
  .page-login--logo {
    width: 240px;
    margin-bottom: 2em;
    margin-top: -2em;
  }
  // 登录表单
  .page-login--form {
    width: 280px;
    // 卡片
    .el-card {
      margin-bottom: 15px;
    }
    // 登录按钮
    .button-login {
      width: 100%;
    }
    // 输入框左边的图表区域缩窄
    .el-input-group__prepend {
      padding: 0px 14px;
    }
    .login-code {
      height: 40px - 2px;
      display: block;
      margin: 0px -20px;
      border-top-right-radius: 2px;
      border-bottom-right-radius: 2px;
    }
    // 登陆选项
    .page-login--options {
      margin: 0px;
      padding: 0px;
      font-size: 14px;
      color: $color-primary;
      margin-bottom: 15px;
      font-weight: bold;
    }
    .page-login--quick {
      width: 100%;
    }
  }
  // 快速选择用户面板
  .page-login--quick-user {
    @extend %flex-center-col;
    padding: 10px 0px;
    border-radius: 4px;
    &:hover {
      background-color: $color-bg;
      i {
        color: $color-text-normal;
      }
      span {
        color: $color-text-normal;
      }
    }
    i {
      font-size: 36px;
      color: $color-text-sub;
    }
    span {
      font-size: 12px;
      margin-top: 10px;
      color: $color-text-sub;
    }
  }
  // footer
  .page-login--content-footer {
    padding: 1em 0;
    .page-login--content-footer-locales {
      padding: 0px;
      margin: 0px;
      margin-bottom: 15px;
      font-size: 12px;
      line-height: 12px;
      text-align: center;
      color: $color-text-normal;
      a {
        color: $color-text-normal;
        margin: 0 0.5em;
        &:hover {
          color: $color-text-main;
        }
      }
    }
    .page-login--content-footer-copyright {
      padding: 0px;
      margin: 0px;
      margin-bottom: 10px;
      font-size: 12px;
      line-height: 12px;
      text-align: center;
      color: $color-text-normal;
      a {
        color: $color-text-normal;
      }
    }
    .page-login--content-footer-options {
      padding: 0px;
      margin: 0px;
      font-size: 12px;
      line-height: 12px;
      text-align: center;
      a {
        color: $color-text-normal;
        margin: 0 1em;
      }
    }
  }
  // 背景
  .circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0px;
    padding: 0px;
    li {
      position: absolute;
      display: block;
      list-style: none;
      width: 20px;
      height: 20px;
      background: #fff;
      animation: animate 25s linear infinite;
      bottom: -200px;
      @keyframes animate {
        0% {
          transform: translateY(0) rotate(0deg);
          opacity: 1;
          border-radius: 0;
        }
        100% {
          transform: translateY(-1000px) rotate(720deg);
          opacity: 0;
          border-radius: 50%;
        }
      }
      &:nth-child(1) {
        left: 15%;
        width: 80px;
        height: 80px;
        animation-delay: 0s;
      }
      &:nth-child(2) {
        left: 5%;
        width: 20px;
        height: 20px;
        animation-delay: 2s;
        animation-duration: 12s;
      }
      &:nth-child(3) {
        left: 70%;
        width: 20px;
        height: 20px;
        animation-delay: 4s;
      }
      &:nth-child(4) {
        left: 40%;
        width: 60px;
        height: 60px;
        animation-delay: 0s;
        animation-duration: 18s;
      }
      &:nth-child(5) {
        left: 65%;
        width: 20px;
        height: 20px;
        animation-delay: 0s;
      }
      &:nth-child(6) {
        left: 75%;
        width: 150px;
        height: 150px;
        animation-delay: 3s;
      }
      &:nth-child(7) {
        left: 35%;
        width: 200px;
        height: 200px;
        animation-delay: 7s;
      }
      &:nth-child(8) {
        left: 50%;
        width: 25px;
        height: 25px;
        animation-delay: 15s;
        animation-duration: 45s;
      }
      &:nth-child(9) {
        left: 20%;
        width: 15px;
        height: 15px;
        animation-delay: 2s;
        animation-duration: 35s;
      }
      &:nth-child(10) {
        left: 85%;
        width: 150px;
        height: 150px;
        animation-delay: 0s;
        animation-duration: 11s;
      }
    }
  }
}
</style>
